﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Edit.Master" AutoEventWireup="true"
    CodeBehind="ArchiveGlobalSearch.aspx.cs" Inherits="Web.Views.SingleWellManage.ArchiveGlobalSearch" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    
    <script src="../../Javascript/UserControls.js" type="text/javascript"></script>
    <script type="text/javascript">
        window.onload = function () {


            var headerchk = document.getElementById("ctl00_edit_gv_SingleWellList_ctl01_ckdHeader");
            if (headerchk != null && headerchk != undefined) {
                headerchk.onclick = function () {
                    var gvData = document.getElementById("ctl00_edit_gv_SingleWellList");
                    /*
                    gridview 生成的HTML标签中对应的表格，第一行和最后一行非数据行
                    */
                    for (var i = 1; i < gvData.rows.length; i++) {
                        var check = gvData.rows[i].cells[0].getElementsByTagName("input")[1];
                        check.checked = this.checked;
                    }
                }
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="button" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="edit" runat="server">
    <div class=" datagrid" style="margin-top:5px;">
        <table cellpadding="0" cellspacing="0" width="100%"  >
            <tr>
                <td style="width: 80%; margin-left:0">
                    <input runat="server" id="txtSearchKeyword" class="search_input_text" onblur="if(this.value=='')value='- 可输入井号题名施工措施井别档号全宗号以及明细查询 -';" onfocus="if(this.value=='- 可输入井号题名施工措施井别档号全宗号以及明细查询 -')value='';" value="- 可输入井号题名施工措施井别档号全宗号以及明细查询 -" style="width: 98%;" />
                </td>
                <td>
                    <asp:Button ID="BtnSearch" Width="200" runat="server" CssClass="search_btn" OnClick="BtnSearch_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div id="divAgent" style=" margin-top:5px;">
        <ep:EPGridView ID="gv_SingleWellList" runat="server" Width="100%" AutoGenerateColumns="False" CssClass="gridview"
            dataSortExpression="" EnableEmptyContentRender="True" EnableModelValidation="True"  RowStyle-Height="15"
            HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"  
            Goto="0" GvPageCount="0" ShowCheckBox="False">
            <Columns>
                <asp:TemplateField  HeaderStyle-Width="4%" ItemStyle-HorizontalAlign="Center" >
                    <HeaderTemplate>
                        <asp:CheckBox ID="ckdHeader" runat="server" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HiddenField ID="hiddenDataID" runat="server" Value='<%# Eval("DataID") %>' />
                        <asp:CheckBox ID="chkID" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DataID" Visible="false" />
                <asp:HyperLinkField HeaderText="文件名" DataTextField="DataFileName" DataNavigateUrlFormatString="SingleWellView.aspx?op=scan&DataID={0}"
                 DataNavigateUrlFields="DataID"   HeaderStyle-Width="20%" />
                <asp:BoundField HeaderText="施工措施" DataField="WORKMODE" HeaderStyle-Width="5%" >
                </asp:BoundField>
                <asp:BoundField HeaderText="开工日期" DataField="BEGINDATE" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center"
                    DataFormatString="{0: yyyy-MM-dd}">
                </asp:BoundField>
                <asp:BoundField HeaderText="完工日期" DataField="FINISHDATE" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center"
                    DataFormatString="{0: yyyy-MM-dd}">
                </asp:BoundField>
                <asp:BoundField HeaderText="井号" DataField="WELLCODE" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                </asp:BoundField>
                <asp:BoundField HeaderText="井别" DataField="WELLTYPE" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                </asp:BoundField>
                <asp:BoundField HeaderText="开钻日期" DataField="BEGINWORKDATE" HeaderStyle-Width="7%"
                    ItemStyle-HorizontalAlign="Center" DataFormatString="{0: yyyy-MM-dd}">
                </asp:BoundField>
                <asp:BoundField HeaderText="完钻日期" DataField="FINISHWORKDATE" HeaderStyle-Width="7%"
                    ItemStyle-HorizontalAlign="Center" DataFormatString="{0: yyyy-MM-dd}">
                </asp:BoundField>
                <asp:BoundField HeaderText="完钻深度" DataField="WELLDEPTH" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                </asp:BoundField>
            </Columns>
            <PagerTemplate>
                <asp:Table ID="Table1" runat="server">
                    <asp:TableRow ID="TableRow1" runat="server">
                        <asp:TableCell ID="TableCell1" runat="server">
                            <asp:Label runat="server" ID="lbPage" Style="margin-right: 50px;">总共有几页</asp:Label>
                            <asp:LinkButton runat="server" CommandName="Page" CommandArgument="First" ID="btnFirst">
                                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/NewGrid/page+.png"></asp:Image>
                            </asp:LinkButton>
                            <asp:LinkButton runat="server" CommandName="Page" CommandArgument="Prev" ID="btnPrev">
                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/NewGrid/page+-.png"></asp:Image>
                            </asp:LinkButton>
                            <asp:LinkButton runat="server" CommandName="Page" CommandArgument="Next" ID="btnNext">
                                <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/NewGrid/page-+.png"></asp:Image>
                            </asp:LinkButton>
                            <asp:LinkButton runat="server" CommandName="Page" CommandArgument="Last" ID="btnLast">
                                <asp:Image ID="Image4" runat="server" ImageUrl="~/Images/NewGrid/page-.png"></asp:Image>
                            </asp:LinkButton>
                            <asp:TextBox runat="server" Height="15px" Width="30px" ID="txtPageInex" onkeydown="enteryKeyEvent(this);"></asp:TextBox>
                            <asp:LinkButton runat="server" CommandName="goto" ID="btnGoto">
                                <asp:Image ID="Image5" runat="server" ImageUrl="~/Images/NewGrid/go.png"></asp:Image>
                            </asp:LinkButton>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
            </PagerTemplate>
        </ep:EPGridView>
        <ep:AspNetPager SubmitButtonText=" GO " ID="aspNetPagerSearch" Height="26px"    Width="100%" CssClass="yahoo2"
                    runat="server"  PageSize="10" LayoutType="Table"
                    ShowCustomInfoSection="Right" CustomInfoClass="custom" CustomInfoStyle=" clear:both;"
                    ShowPageIndexBox="Always" SubmitButtonImageUrl="../Images/go.png" ShowPageIndex="true"
                    PageIndexBoxType="TextBox"  CustomInfoHTML="第 %CurrentPageIndex% 页，共 %PageCount% 页，每页显示 %PageSize% 条，共 %RecordCount% 条" OnPageChanging="aspNetPagerSearch_PageChanging"
                    AlwaysShow="false">
                </ep:AspNetPager>
    </div>

    <%--<div style="margin-top:5px; display:none;">
        <button type="reset" class="sexybutton" runat="server" id="btnAddSingelWell" onclick="window.location.href='ASingleWellSearch.aspx';">
            <span><span><span class="add">添加借阅</span></span></span></button>
    </div>--%>
</asp:Content>
